![Introducing Dashboard Analytics](https://cdn.sanity.io/images/cgdhsj6q/production/af327c5bd94708db501516a75da6870aef894c64-2286x1522.png?w=400&fit=max&auto=format)
Product
Introducing Dashboard Analytics
We're introducing a new Analytics feature in the Socket dashboard so you can view changes in your organization's and repositories' alerts over time.
log-symbols
Advanced tools
The log-symbols package provides a set of symbols for use in console logging, which are especially useful for distinguishing different levels of log messages such as success, info, warning, and error. These symbols are cross-platform and will display correctly on different operating systems, including fallbacks for Windows.
Success Symbol
Displays a green check mark to indicate a successful operation.
const logSymbols = require('log-symbols');
console.log(logSymbols.success, 'Operation successful!');
Info Symbol
Displays a blue 'i' to represent an informational message.
const logSymbols = require('log-symbols');
console.log(logSymbols.info, 'Information message.');
Warning Symbol
Displays a yellow exclamation mark to signal a warning.
const logSymbols = require('log-symbols');
console.log(logSymbols.warning, 'Warning! Something needs attention.');
Error Symbol
Displays a red cross to indicate an error or a problem.
const logSymbols = require('log-symbols');
console.log(logSymbols.error, 'Error! Something went wrong.');
Chalk is a popular package that allows you to style and colorize text in the console. While it doesn't provide symbols, it is often used in conjunction with log-symbols to color the text accompanying the symbols for better visibility and emphasis.
Figures provides a set of unicode symbols that can be used in the console, similar to log-symbols. It includes more symbols than log-symbols, offering a wider variety of icons for different use cases.
Ora is a package that provides elegant terminal spinners. Although its primary feature is different, it includes symbols for success, info, warning, and error, which can be used similarly to log-symbols.
cli-spinners is a collection of spinners for use in the terminal, similar to ora. It also includes some static symbols, but its main focus is on animated spinners for long-running tasks.
Colored symbols for various log levels
Includes fallbacks for Windows CMD which only supports a limited character set.
$ npm install --save log-symbols
var logSymbols = require('log-symbols');
console.log(logSymbols.success, 'finished successfully!');
// On real OSes: ✔ finished successfully!
// On Windows: √ finished successfully!
MIT © Sindre Sorhus
FAQs
Colored symbols for various log levels. Example: `✔︎ Success`
The npm package log-symbols receives a total of 0 weekly downloads. As such, log-symbols popularity was classified as not popular.
We found that log-symbols demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We're introducing a new Analytics feature in the Socket dashboard so you can view changes in your organization's and repositories' alerts over time.
Security News
A new OpenSSF report uncovers critical gaps in secure software training, with 75% of new developers unfamiliar with secure practices, highlighting urgent educational needs.
Security News
The 2023 Python Developers Survey reveals key trends in packaging, web frameworks, and developer demographics, highlighting a shift toward innovative tools as the Python community diversifies and grows among less experienced developers.